package a07;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class A07_1 {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(A07_1.class, args);
        context.close();
    }

    @Bean(initMethod = "init")
    public Bean01 bean01() {
        return new Bean01();
    }

    @Bean(destroyMethod = "destroy2")
    public Bean02 bean02() {
        return new Bean02();
    }
}
